package com.jjty.dataGenerator.jserji.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.jjty.dataGenerator.config.MapJsonTypeHandler;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.HashMap;
import java.util.Map;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName(value = "js_device_data",autoResultMap = true)
public class JsDeviceData {
    @TableId(type = IdType.AUTO)
    private Integer id;
    private String dataType;
    private String encodedData;
    @TableField(typeHandler = MapJsonTypeHandler.class)
    private Map<String, Object> dataFields = new HashMap<>();
}